/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 加入活动 POST /task/open/user/joinTask */
export async function taskOpenUserJoinTaskUsingPost({
  body,
  options,
}: {
  body: API.TaskUserBoTaskOpenUserJoinTask;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/task/open/user/joinTask', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户分页查看自己参加的活动 POST /task/open/user/pageSelf */
export async function taskOpenUserPageSelfUsingPost({
  body,
  options,
}: {
  body: API.TaskUserBoTaskOpenUserPageSelf;
  options?: { [key: string]: unknown };
}) {
  return request<API.RPageDataVoTaskUserVo>('/task/open/user/pageSelf', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 活动签到---二维码 POST /task/open/user/signIn */
export async function taskOpenUserSignInUsingPost({
  body,
  options,
}: {
  body: API.TaskUserBoTaskOpenUserSignIn;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/task/open/user/signIn', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 活动签到---位置签到 POST /task/open/user/signInLocation */
export async function taskOpenUserSignInLocationUsingPost({
  body,
  options,
}: {
  body: API.TaskUserBoTaskOpenUserSignInLocation;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/task/open/user/signInLocation', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
